package com.android.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class HelloAndroid extends Activity {
	   /** Called when the activity is first created. */
	   @Override
	   public void onCreate(Bundle savedInstanceState) {
	       super.onCreate(savedInstanceState);
	       TextView tv = new TextView(this);
	       tv.setText("Hello, Android");
	       setContentView(tv);
	       
	       setContentView(R.layout.main);
	       final Button closeButton = (Button)this.findViewById(R.id.trigger);
	       closeButton.setOnClickListener(new View.OnClickListener() {
	         public void onClick(View v) {
	           finish();
	         }
	       });	       
	   }
}